<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
		<meta charset="utf-8" />
	<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">我的实习</a></li>
    <li><a href="#">实习变更</a></li>
    </ul>
    </div>
    <div class="rightinfo">
    <div class="tools">
    	<ul class="toolbar">
        <li class="click add"><span><img src="images/t01.png" /></span>添加</li>
       <!--  <li class="click"><span><img src="images/sx.png" /></span>刷新</li> -->
        <!--<li class="click"><span><img src="images/t02.png" /></span>修改</li>
        <li><span><img src="images/t03.png" /></span>删除</li>
        <li><span><img src="images/t04.png" /></span>统计</li>-->
        </ul>
         <form id="searchForm" class="form-search"
						action="practiceChange/myPracticeChange_page_list.do" method="post">
						 <input type="hidden" name="pageNumber" value="1" />
					</form>
    </div>
    <table class="tablelist">
    	<thead>
    	<tr>
    	<th>姓名</th>
        <th>申请日期</th>
        <th>申请实习类别</th>
		<th>申请实习单位</th>
		<th>申请实习时间</th>
		<th>变更处理状态</th>
        <th>操作</th>
      </tr>
        </thead>
        <tbody>
          <c:forEach items="${practiceChangeList}" var="practiceChange"  varStatus="status">
      <tr>
       <td>${practiceChange.studentName }</td>
        <td>${practiceChange.applyTime }</td>
        <td><c:if test="${practiceChange.toStatus==0}">在校</c:if>
			<c:if test="${practiceChange.toStatus==1}">自主创业</c:if>
			<c:if test="${practiceChange.toStatus==2}">专升本</c:if>
			<c:if test="${practiceChange.toStatus==3}">自寻企业实习</c:if>
			<c:if test="${practiceChange.toStatus==4}">学校分配企业</c:if></td>
        <td>${practiceChange.enterpriseName }</td>
        <td>${practiceChange.startTime }至${practiceChange.endTime }</td>
        <td><c:if test="${practiceChange.checkApprove==0}">未审核</c:if>
         <c:if test="${practiceChange.checkApprove==1}">指导教师未批准</c:if>
         <c:if test="${practiceChange.checkApprove==2}">指导教师已批准</c:if>
         <c:if test="${practiceChange.checkApprove==3}">部门未批准</c:if>
         <c:if test="${practiceChange.checkApprove==4}">部门已批准</c:if></td>
		<td><c:if test="${practiceChange.checkApprove==0}"><a onclick="edit(${practiceChange.id })">编辑</a>&nbsp;&nbsp;&nbsp;&nbsp;</c:if></td>
      </tr> 
      </c:forEach>
        </tbody>
    </table>
   <div class="pagin">
    	<%@ include file="page.jsp"%>
    </div>
    </div>
    <script src="js/jquery-1.7.2.js"></script>
    <script src="layer/layer.js"></script>
     <script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');
	$( "#btnSearch" ).on('click', function(e) {
		$("#searchForm").submit();
	});
	function GoToPage(toPage,totalPage) {
	    if(toPage<=0) return;
	    if(toPage>totalPage) return;
	    $("input[name='pageNumber']").val(toPage);
	    $("#searchForm").submit();
	};
	
	
	$(".add").click(
	function  () {
		layer.open({
  type: 2,
  closeBtn: 2,
  title: '申请实习变更',
  shadeClose: true,
  shade: 0.6,
  area: ['630px', '500px'],
  content: 'practiceChange/my_practice_change_add.do',
  end: function () {
      location.reload();
  }
});
	}
	);
	function closeAll() {
		layer.alert('申请成功!', {
			skin : 'layer-ext-moon'
		}, function() {
			layer.closeAll(); 
			 location.reload();
		}); 
	}
	function close() {
		layer.alert('修改成功!', {
			skin : 'layer-ext-moon'
		}, function() {
			layer.closeAll(); 
			 location.reload();
		}); 
	}
	function edit (id) {
		layer.open({
  type: 2,
  closeBtn: 2,
  title: '实习变更编辑',
  shadeClose: true,
  shade: 0.6,
  area: ['630px', '500px'],
  content: 'practiceChange/my_practice_change_edit.do?id='+id,
  end: function () {
      location.reload();
  }
});
	}
	</script>
</body>

</html>
